package com.rlz.base.app

import android.app.Application
import com.rlz.base.cache.AppCache
import com.rlz.base.cache.CacheManager
import com.rlz.base.cache.UserCache

/**
 * Created by RLZ
 * on 2021/5/13
 *
 */
open class Base : Application() {

    override fun onCreate() {
        super.onCreate()
        CacheManager.inject(AppCache(),
                UserCache())
        sAppContext = this
    }

    companion object {

        lateinit var sAppContext: Application

        @JvmStatic
        fun obtain(): Application {
            return sAppContext
        }
    }
}